package com.hu.zhcc.shiro.service;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.hu.zhcc.shiro.dao.TJ_TMemberMapper;
import com.hu.zhcc.shiro.dao.Tj_TInterposeFollowupVisitMapper;
import com.hu.zhcc.shiro.entity.tj.TInterposeFollowupVisit;
import com.hu.zhcc.shiro.entity.tj.TMember;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 随访日记表 服务实现类
 * </p>
 *
 * @author tj
 * @since 2021-06-24
 */
@Service
public class Tj_TInterposeFollowupVisitServiceImpl extends ServiceImpl<Tj_TInterposeFollowupVisitMapper,TInterposeFollowupVisit> implements Tj_TInterposeFollowupVisitService {
    @Autowired
    private TJ_TMemberMapper tj_tMemberMapper;
    @Autowired
    private Tj_TInterposeFollowupVisitMapper tjTInterposeFollowupVisitMapper;
    @Override
    public int inserts(TInterposeFollowupVisit tInterposeFollowupVisit) {
        TMember tMember = tj_tMemberMapper.queryLast();
        tInterposeFollowupVisit.setHealthMgrId(tMember.getHealthMgrId());
        tInterposeFollowupVisit.setFilenumber(tMember.getFileNumber());
        tInterposeFollowupVisit.setInterposeName(tMember.getName());
        tInterposeFollowupVisit.setVisistatue("未随访");
        tInterposeFollowupVisit.setGyStatue("未结束");
        int inserts = tjTInterposeFollowupVisitMapper.inserts(tInterposeFollowupVisit);
        return inserts;
    }
}
